#ifndef MAIN_H
#define MAIN_H
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#include "gd32f30x.h"
#include "hem1604.h"
#define HEM1601_CAN_IO 0



//定时器是500us
#define TIME_OUT_1MS   2
#define TIME_OUT_2MS   4
#define TIME_OUT_5MS   10
#define TIME_OUT_10MS  20
#define TIME_OUT_20MS  (2*TIME_OUT_10MS)
#define TIME_OUT_50MS  (5*TIME_OUT_10MS)
#define TIME_OUT_60MS  (6*TIME_OUT_10MS)
#define TIME_OUT_100MS 200
#define TIME_OUT_200MS 400
#define TIME_OUT_250MS 500
#define TIME_OUT_500MS 1000
#define TIME_OUT_1S    2000
#define TIME_OUT_5S    (5*TIME_OUT_1S)  
#define TIME_OUT_10S   (10*TIME_OUT_1S)
#define APP_LOAD_ADDR_OFFSET 0x00008000  /*应用程序偏移地址*/


extern uint32_t ul_can_rx_error_cnt;
extern uint8_t uc_can_tx_error_flag;
extern uint8_t gStatusLEDFlickerTimeoutSn;
extern uint32_t ul_radio_status_led_timeout_cnt;
extern uint32_t ul_system_tick;
extern uint32_t gSpeedLedTimeoutCnt;
extern uint8_t gSpeedLEDFlickerTimeoutSn;
extern uint8_t uc_feed_watch_dog_timeout_flag;
#endif

